<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<form:form cssClass="form-horizontal" modelAttribute="helperGroup"
	action="helpergroup" method="post">
			'
				<h3>创建群组</h3>
	<div class="control-group">
		<label class="control-label" for="inputName">名字</label>
		<div class="controls">
			<form:input id="inputName" path="name" />
		</div>
	</div>
	<div class="control-group">
		<label class="control-label" for="inputDesc">描述</label>
		<div class="controls">
			<form:input id="inputDesc" path="desc" />
		</div>
	</div>
	<div class="control-group">
		<label class="control-label" for="inputLeader">领导者</label>
		<div class="controls">
			<form:select id="inputLeader" path="leader.id">
			<form:option value="-" label="--请选择--" selected="selected"/>
			<form:options items="${users}" itemValue="id" itemLabel="name" />
			</form:select>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label" for="inputHelpers">帮助者</label>
		<div class="controls">
			<c:forEach var="user" items="${users}" varStatus="status">
					<label class="checkbox inline">
			    	<form:checkbox path="helpers[${status.index}].id" value="${user.id}"/>
			    	<c:out value="${user.name}"/>
			    	</label>
			</c:forEach>
		</div>
	</div>
	
	<div class="control-group">
		<div class="controls">
			<button type="submit" class="btn btn-primary">创建</button>
			<button type="button" class="btn">返回</button>
		</div>
	</div>
</form:form>
